﻿<!--*************************************************************************************

   Toolkit for WPF

   Copyright (C) 2007-2016 Xceed Software Inc.

   This program is provided to you under the terms of the Microsoft Public
   License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license 

   For more features, controls, and fast professional support,
   pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/

   Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

  ***********************************************************************************-->
<Window x:Class="Xceed.Wpf.Toolkit.LiveExplorer.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer"
        xmlns:samples="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples;assembly=Xceed.Wpf.Toolkit.LiveExplorer"
        xmlns:core="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Core"
        xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
        AllowsTransparency="False"
        Icon="App.ico"
        Title="Toolkit Plus for WPF - LiveExplorer"
        Height="778"
        Width="1300">
   <Window.Resources>
      <ResourceDictionary>
         <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="Resources/LiveExplorerScrollViewer.xaml" />
         </ResourceDictionary.MergedDictionaries>

         <SolidColorBrush x:Key="SampleDefaultBrush">#FFC72035</SolidColorBrush>

         <!--This style is used to override the LiveExplorer scroll bar within the samples-->
         <Style x:Key="ScrollBarBaseStyle"
                TargetType="{x:Type ScrollBar}" />

         <BooleanToVisibilityConverter x:Key="BoolToVisibilityConverter" />

         <PathGeometry x:Key="TreeArrow">
            <PathGeometry.Figures>
               <PathFigureCollection>
                  <PathFigure IsFilled="True"
                              StartPoint="0 0"
                              IsClosed="True">
                     <PathFigure.Segments>
                        <PathSegmentCollection>
                           <LineSegment Point="8 4" />
                           <LineSegment Point="0 8" />
                        </PathSegmentCollection>
                     </PathFigure.Segments>
                  </PathFigure>
               </PathFigureCollection>
            </PathGeometry.Figures>
         </PathGeometry>

         <Style x:Key="ExpandCollapseToggleStyle"
                TargetType="{x:Type ToggleButton}">
            <Setter Property="Width"
                    Value="20" />
            <Setter Property="Height"
                    Value="20" />
            <Setter Property="Template">
               <Setter.Value>
                  <ControlTemplate TargetType="{x:Type ToggleButton}">
                     <Border Width="20"
                             Height="20"
                             Background="Transparent"
                             Padding="5,6,3,3">
                        <Path x:Name="ExpandPath"
                              Fill="{StaticResource SampleDefaultBrush}"
                              Stroke="{StaticResource SampleDefaultBrush}"
                              Data="{StaticResource TreeArrow}">
                        </Path>
                     </Border>
                     <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="True">
                           <Setter TargetName="ExpandPath"
                                   Property="Stroke"
                                   Value="{StaticResource SampleDefaultBrush}" />
                           <Setter TargetName="ExpandPath"
                                   Property="Fill"
                                   Value="{StaticResource SampleDefaultBrush}" />
                        </Trigger>

                        <Trigger Property="IsChecked"
                                 Value="True">
                           <Setter TargetName="ExpandPath"
                                   Property="RenderTransform">
                              <Setter.Value>
                                 <RotateTransform Angle="90"
                                                  CenterX="4"
                                                  CenterY="4" />
                              </Setter.Value>
                           </Setter>
                           <Setter TargetName="ExpandPath"
                                   Property="Fill"
                                   Value="{StaticResource SampleDefaultBrush}" />
                           <Setter TargetName="ExpandPath"
                                   Property="Stroke"
                                   Value="{StaticResource SampleDefaultBrush}" />
                        </Trigger>
                     </ControlTemplate.Triggers>
                  </ControlTemplate>
               </Setter.Value>
            </Setter>
         </Style>

         <ControlTemplate x:Key="TreeViewItemTemplate"
                          TargetType="{x:Type TreeViewItem}">
            <Grid>
               <Grid.ColumnDefinitions>
                  <ColumnDefinition MinWidth="19"
                                    Width="Auto" />
                  <ColumnDefinition Width="Auto" />
                  <ColumnDefinition Width="*" />
               </Grid.ColumnDefinitions>
               <Grid.RowDefinitions>
                  <RowDefinition Height="Auto" />
                  <RowDefinition />
               </Grid.RowDefinitions>
               <ToggleButton x:Name="Expander"
                             Style="{StaticResource ExpandCollapseToggleStyle}"
                             IsChecked="{Binding Path=IsExpanded,RelativeSource={RelativeSource TemplatedParent}}"
                             ClickMode="Press" />
               <Border Name="Bd"
                       Grid.Column="1"
                       Background="{TemplateBinding Background}"
                       BorderBrush="{TemplateBinding BorderBrush}"
                       BorderThickness="{TemplateBinding BorderThickness}"
                       Padding="{TemplateBinding Padding}"
                       SnapsToDevicePixels="true">
                  <ContentPresenter x:Name="PART_Header"
                                    ContentSource="Header"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
               </Border>
               <ItemsPresenter x:Name="ItemsHost"
                               Grid.Row="1"
                               Grid.Column="1"
                               Grid.ColumnSpan="2" />
            </Grid>
            <ControlTemplate.Triggers>
               <Trigger Property="IsExpanded"
                        Value="false">
                  <Setter TargetName="ItemsHost"
                          Property="Visibility"
                          Value="Collapsed" />
               </Trigger>
               <Trigger Property="HasItems"
                        Value="false">
                  <Setter TargetName="Expander"
                          Property="Visibility"
                          Value="Hidden" />
               </Trigger>
               <Trigger Property="IsSelected"
                        Value="true">
                  <Setter TargetName="Bd"
                          Property="Background"
                          Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
                  <Setter Property="Foreground"
                          Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
               </Trigger>
               <MultiTrigger>
                  <MultiTrigger.Conditions>
                     <Condition Property="IsSelected"
                                Value="true" />
                     <Condition Property="IsSelectionActive"
                                Value="false" />
                  </MultiTrigger.Conditions>
                  <Setter TargetName="Bd"
                          Property="Background"
                          Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
                  <Setter Property="Foreground"
                          Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
               </MultiTrigger>
               <Trigger Property="IsEnabled"
                        Value="false">
                  <Setter Property="Foreground"
                          Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
               </Trigger>
            </ControlTemplate.Triggers>
         </ControlTemplate>

         <Style x:Key="treeItemSuffixStyle"
                TargetType="TextBlock">
            <Setter Property="VerticalAlignment"
                    Value="Center" />
            <Setter Property="FontFamily"
                    Value="Segoe" />
            <Setter Property="FontWeight"
                    Value="SemiBold" />
            <Setter Property="FontSize"
                    Value="12" />
            <Setter Property="Margin"
                    Value="5,0,0,0" />
         </Style>

         <Style x:Key="treeItemNewSuffix"
                TargetType="TextBlock"
                BasedOn="{StaticResource treeItemSuffixStyle}">
            <Setter Property="Text"
                    Value="New" />
            <Setter Property="Foreground"
                    Value="#ea00ff" />
            <Setter Property="Visibility"
                    Value="{Binding IsNewFeature, RelativeSource={RelativeSource AncestorType={x:Type TreeViewItem}}, Converter={StaticResource BoolToVisibilityConverter}}" />
         </Style>


         <Style x:Key="treeItemPlusSuffix"
                TargetType="TextBlock"
                BasedOn="{StaticResource treeItemSuffixStyle}">
            <Setter Property="Text"
                    Value="Plus" />
            <Setter Property="Foreground"
                    Value="#06b025" />
            <Setter Property="Visibility"
                    Value="{Binding IsPlusOnlyFeature, RelativeSource={RelativeSource AncestorType={x:Type TreeViewItem}}, Converter={StaticResource BoolToVisibilityConverter}}" />
         </Style>

         <Style x:Key="TreeViewHeaderStyle"
                TargetType="TreeViewItem">
            <Style.Resources>
               <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}">
                  Transparent
               </SolidColorBrush>
               <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}">
                  Black
               </SolidColorBrush>
            </Style.Resources>

            <Setter Property="FontSize"
                    Value="30" />
            <Setter Property="FontFamily"
                    Value="Segoe UI" />
            <Setter Property="FontWeight"
                    Value="Light" />
            <Setter Property="Foreground"
                    Value="Black" />
            <Setter Property="Focusable"
                    Value="False" />
            <Setter Property="IsExpanded"
                    Value="True" />
            <Setter Property="Template"
                    Value="{StaticResource TreeViewItemTemplate}" />
            <Setter Property="HeaderTemplate">
               <Setter.Value>
                  <DataTemplate>
                     <Border x:Name="_treeViewItemBorder">
                        <StackPanel Orientation="Horizontal">
                           <TextBlock Text="{Binding}"
                                      Cursor="Hand"
                                      Margin="0,0,5,0" />
                           <TextBlock Style="{StaticResource treeItemNewSuffix}" />
                           <TextBlock Style="{StaticResource treeItemPlusSuffix}" />
                        </StackPanel>
                     </Border>
                  </DataTemplate>
               </Setter.Value>
            </Setter>
         </Style>

         <Style x:Key="TreeViewSubHeaderStyle"
                TargetType="TreeViewItem">
            <Style.Resources>
               <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}">
                  Transparent
               </SolidColorBrush>
               <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}">
                  Black
               </SolidColorBrush>
            </Style.Resources>

            <Setter Property="FontSize"
                    Value="14" />
            <Setter Property="FontFamily"
                    Value="Segoe UI" />
            <Setter Property="FontWeight"
                    Value="Light" />
            <Setter Property="Foreground"
                    Value="Black" />
            <Setter Property="Template"
                    Value="{StaticResource TreeViewItemTemplate}" />
            <Setter Property="HeaderTemplate">
               <Setter.Value>
                  <DataTemplate>
                     <TextBlock Text="{Binding}"
                                Cursor="Hand" />
                  </DataTemplate>
               </Setter.Value>
            </Setter>
         </Style>

         <Style x:Key="TreeViewItemStyle"
                TargetType="TreeViewItem">
            <Style.Resources>
               <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}">
                  Transparent
               </SolidColorBrush>
               <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}">
                  Transparent
               </SolidColorBrush>
            </Style.Resources>

            <Setter Property="FontSize"
                    Value="14" />
            <Setter Property="FontFamily"
                    Value="Segoe UI" />
            <Setter Property="FontWeight"
                    Value="Light" />
            <Setter Property="Foreground"
                    Value="Black" />
            <Setter Property="Template"
                    Value="{StaticResource TreeViewItemTemplate}" />
            <Setter Property="HeaderTemplate">
               <Setter.Value>
                  <DataTemplate>
                     <Border x:Name="_treeViewItemBorder">
                        <StackPanel Orientation="Horizontal">
                           <TextBlock Text="{Binding}"
                                      Margin="0,0,5,0" />
                           <TextBlock Style="{StaticResource treeItemNewSuffix}" />
                           <TextBlock Style="{StaticResource treeItemPlusSuffix}" />
                        </StackPanel>
                     </Border>
                     <DataTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="True">
                           <Setter Property="Background"
                                   Value="#e8e8e8"
                                   TargetName="_treeViewItemBorder" />
                        </Trigger>
                     </DataTemplate.Triggers>
                  </DataTemplate>
               </Setter.Value>
            </Setter>
            <Style.Triggers>
               <Trigger Property="IsSelected"
                        Value="True">
                  <Setter Property="FontWeight"
                          Value="Bold" />
                  <Setter Property="Foreground"
                          Value="{StaticResource SampleDefaultBrush}" />
               </Trigger>
            </Style.Triggers>
         </Style>

         <Style x:Key="TabControlStyle"
                TargetType="{x:Type TabControl}">
            <Setter Property="Template">
               <Setter.Value>
                  <ControlTemplate TargetType="{x:Type TabControl}">
                     <Grid KeyboardNavigation.TabNavigation="Local">
                        <Grid.RowDefinitions>
                           <RowDefinition Height="Auto" />
                           <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                           <ColumnDefinition Width="*" />
                           <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <!-- Title -->
                        <TextBlock HorizontalAlignment="Left"
                                   Margin="12,0,0,0"
                                   VerticalAlignment="Top"
                                   FontSize="30"
                                   FontFamily="Segoe UI"
                                   FontWeight="Light"
                                   TextAlignment="right"
                                   Foreground="Black"
                                   TextTrimming="CharacterEllipsis"
                                   Text="{Binding View.Title, RelativeSource={RelativeSource AncestorType={x:Type Window}}}" />
                        <TabPanel Grid.Column="1"
                                  Margin="0,0,13,0"
                                  Background="Transparent"
                                  IsItemsHost="True"
                                  HorizontalAlignment="Right" />
                        <ContentPresenter Grid.Row="1"
                                          Grid.ColumnSpan="2"
                                          Margin="4"
                                          ContentSource="SelectedContent" />
                     </Grid>
                  </ControlTemplate>
               </Setter.Value>
            </Setter>
         </Style>

         <Style x:Key="TabItemStyle"
                TargetType="{x:Type TabItem}">
            <Setter Property="Template">
               <Setter.Value>
                  <ControlTemplate TargetType="{x:Type TabItem}">
                     <Grid Height="33">
                        <Border x:Name="border"
                                Background="#e8e8e8"
                                Margin="3,0,3,0" />
                        <TextBlock x:Name="textBlock"
                                   HorizontalAlignment="Center"
                                   Margin="19,0,19,0"
                                   VerticalAlignment="Center"
                                   FontFamily="Segoe UI"
                                   FontSize="14"
                                   FontWeight="SemiBold"
                                   Foreground="Black"
                                   Text="{TemplateBinding Header}"
                                   TextWrapping="Wrap" />
                     </Grid>
                     <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected"
                                 Value="True">
                           <Setter Property="Background"
                                   TargetName="border"
                                   Value="{StaticResource SampleDefaultBrush}" />
                           <Setter Property="Foreground"
                                   TargetName="textBlock"
                                   Value="White" />
                        </Trigger>
                     </ControlTemplate.Triggers>
                  </ControlTemplate>
               </Setter.Value>
            </Setter>
            <Setter Property="Margin"
                    Value="0,0,1,0" />
         </Style>

      </ResourceDictionary>
   </Window.Resources>
   <Grid Margin="30,30,0,0">
      <Grid.ColumnDefinitions>
         <ColumnDefinition MinWidth="260"
                           Width="Auto" />
         <ColumnDefinition />
      </Grid.ColumnDefinitions>

      <Grid.RowDefinitions>
         <RowDefinition Height="90" />
         <RowDefinition />
      </Grid.RowDefinitions>

      <Image Source="Resources/toolkitIcon.png"
             MouseLeftButtonDown="Image_MouseLeftButtonDown"
             RenderOptions.BitmapScalingMode="Fant"
             Width="190"
             HorizontalAlignment="Left"
             Margin="24,0,0,0"/>

      <TreeView x:Name="_treeView"
                Grid.Row="1"
                BorderThickness="0"
                SelectedItemChanged="OnTreeViewSelectionChanged">
         <TreeView.Resources>
            <Style TargetType="ScrollViewer"
                   BasedOn="{StaticResource LiveExplorerScrollViewerStyle}" />
         </TreeView.Resources>
         <core:LiveExplorerTreeViewItem Header="Data"
                                        Style="{StaticResource TreeViewHeaderStyle}"
                                        ItemContainerStyle="{StaticResource TreeViewItemStyle}">
            <core:LiveExplorerTreeViewItem Header="PropertyGrid"
                                           ItemContainerStyle="{StaticResource TreeViewSubHeaderStyle}"
                                           SampleType="{x:Type samples:PropertyGrid.Views.PropertyGridView}">

               <core:LiveExplorerTreeViewItem Header="Editors"
                                              ItemContainerStyle="{StaticResource TreeViewItemStyle}">
                  <core:LiveExplorerTreeViewItem Header="Default Editors"
                                                 SampleType="{x:Type samples:PropertyGrid.Views.PropertyGridDefaultEditorsView}" />
                  <core:LiveExplorerTreeViewItem Header="EditorTemplateDefinition"
                                                 SampleType="{x:Type samples:PropertyGrid.Views.PropertyGridCustomEditorsView}" />
                  <core:LiveExplorerTreeViewItem Header="More EditorDefinitions..."
                                                 SampleType="{x:Type samples:PropertyGrid.Views.PropertyGridEditorDefinitionsView}"
                                                 IsPlusOnlyFeature="True" />
               </core:LiveExplorerTreeViewItem>
               <core:LiveExplorerTreeViewItem Header="Using SelectedObject(s)"
                                              SampleType="{x:Type samples:PropertyGrid.Views.PropertyGridSelectedObjectView}"
                                              Style="{StaticResource TreeViewItemStyle}"
                                              ItemContainerStyle="{StaticResource TreeViewItemStyle}">
                  <core:LiveExplorerTreeViewItem Header="Using Attributes"
                                                 SampleType="{x:Type samples:PropertyGrid.Views.PropertyGridAttributesView}" />
                  <core:LiveExplorerTreeViewItem Header="Specifying Properties"
                                                 SampleType="{x:Type samples:PropertyGrid.Views.PropertyGridSpecifyingPropertiesView}" />
                  <core:LiveExplorerTreeViewItem Header="Binding to Structs"
                                                 SampleType="{x:Type samples:PropertyGrid.Views.PropertyGridBindingToStructsView}" />
                  <core:LiveExplorerTreeViewItem Header="Category Ordering"
                                                 SampleType="{x:Type samples:PropertyGrid.Views.PropertyGridCategoryOrderView}" />
                  <core:LiveExplorerTreeViewItem Header="Localization"
                                                 SampleType="{x:Type samples:PropertyGrid.Views.PropertyGridDisplayLocalizationView}"
                                                 IsPlusOnlyFeature="True" />
                  <core:LiveExplorerTreeViewItem Header="Multi-Selected Objects"
                                                 SampleType="{x:Type samples:PropertyGrid.Views.PropertyGridMultiSelectedObjectsView}"
                                                 IsPlusOnlyFeature="True" />
                  <core:LiveExplorerTreeViewItem Header="DefinitionKey Attribute"
                                                 SampleType="{x:Type samples:PropertyGrid.Views.PropertyGridDefinitionKeyView}"
                                                 IsPlusOnlyFeature="True" />
               </core:LiveExplorerTreeViewItem>
               <core:LiveExplorerTreeViewItem Header="Using a Custom List"
                                              SampleType="{x:Type samples:PropertyGrid.Views.PropertyGridPropertiesSourceView}"
                                              IsPlusOnlyFeature="True"
                                              Style="{StaticResource TreeViewItemStyle}"
                                              ItemContainerStyle="{StaticResource TreeViewItemStyle}">
                  <core:LiveExplorerTreeViewItem Header="Property Element Syntax"
                                                 SampleType="{x:Type samples:PropertyGrid.Views.PropertyGridPropertiesView}" />
                  <core:LiveExplorerTreeViewItem Header="Custom Properties"
                                                 SampleType="{x:Type samples:PropertyGrid.Views.PropertyGridCustomPropertyView}" />
               </core:LiveExplorerTreeViewItem>
               <core:LiveExplorerTreeViewItem Header="Customizing PropertyItems"
                                              SampleType="{x:Type samples:PropertyGrid.Views.PropertyGridPropertyItemStyleView}"
                                              Style="{StaticResource TreeViewItemStyle}" />

            </core:LiveExplorerTreeViewItem>
            <core:LiveExplorerTreeViewItem Header="DataGrid"
                                           SampleType="{x:Type samples:DataGrid.Views.DataGridView}" />
            <core:LiveExplorerTreeViewItem Header="Multi-Column ComboBox"
                                           SampleType="{x:Type samples:DataGrid.Views.MultiColumnComboBoxView}"
                                           IsPlusOnlyFeature="True" />

            <core:LiveExplorerTreeViewItem Header="ListBox" ItemContainerStyle="{StaticResource TreeViewItemStyle}" SampleType="{x:Type samples:ListBox.Views.ListBoxView}" IsPlusOnlyFeature="True" />

            <core:LiveExplorerTreeViewItem Header="Check lists"
                                           SampleType="{x:Type samples:CheckLists.Views.CheckListsView}" />
            <core:LiveExplorerTreeViewItem Header="Watermark ComboBox"
                                           SampleType="{x:Type samples:WatermarkComboBox.Views.WatermarkComboBoxView}" />
            <core:LiveExplorerTreeViewItem Header="TimelinePanel"
                                           SampleType="{x:Type samples:TimelinePanel.Views.TimelinePanelView}" />
         </core:LiveExplorerTreeViewItem>
         <core:LiveExplorerTreeViewItem Header="Input Fields"
                                        Style="{StaticResource TreeViewHeaderStyle}"
                                        ItemContainerStyle="{StaticResource TreeViewItemStyle}">
            <core:LiveExplorerTreeViewItem Header="Numbers"
                                           SampleType="{x:Type samples:Numeric.Views.NumericView}" />
            <core:LiveExplorerTreeViewItem Header="DateTime"
                                           SampleType="{x:Type samples:DateTime.Views.DateTimeView}" />             
            <core:LiveExplorerTreeViewItem Header="TimeSpan"
                                           SampleType="{x:Type samples:TimeSpan.Views.TimeSpanView}"/>
            <core:LiveExplorerTreeViewItem Header="Color"
                                           SampleType="{x:Type samples:Color.Views.ColorView}" />
            <core:LiveExplorerTreeViewItem Header="Text"
                                           Style="{StaticResource TreeViewSubHeaderStyle}"
                                           ItemContainerStyle="{StaticResource TreeViewItemStyle}">
               <core:LiveExplorerTreeViewItem Header="AutoSelectTextBox"
                                              SampleType="{x:Type samples:Text.Views.AutoSelectTextboxView}" />
               <core:LiveExplorerTreeViewItem Header="MaskedTextBox"
                                              SampleType="{x:Type samples:Text.Views.MaskedTextboxView}" />
               <core:LiveExplorerTreeViewItem Header="MultiLineTextEditor"
                                              SampleType="{x:Type samples:Text.Views.MultiLineTextEditorView}" />
               <core:LiveExplorerTreeViewItem Header="RichTextBox"
                                              SampleType="{x:Type samples:Text.Views.RichTextboxView}" />
               <core:LiveExplorerTreeViewItem Header="WatermarkTextBox"
                                              SampleType="{x:Type samples:Text.Views.WatermarkTextboxView}" />
               <core:LiveExplorerTreeViewItem Header="WatermarkPasswordBox"
                                              SampleType="{x:Type samples:Text.Views.WatermarkPasswordBoxView}" 
                                              IsNewFeature="True"/>
               <core:LiveExplorerTreeViewItem Header="TokenizedTextBox"
                                              SampleType="{x:Type samples:TokenizedTextBox.Views.TokenizedTextBoxView}"
                                              IsPlusOnlyFeature="True" />
            </core:LiveExplorerTreeViewItem>
            <core:LiveExplorerTreeViewItem Header="Files"
                                           SampleType="{x:Type samples:FilePicker.Views.FilePickerView}"
                                           IsPlusOnlyFeature="True"/>
            <core:LiveExplorerTreeViewItem Header="RangeSlider"
                                           SampleType="{x:Type samples:RangeSlider.Views.RangeSliderView}"/>
            <core:LiveExplorerTreeViewItem Header="Rating"
                                           SampleType="{x:Type samples:Rating.Views.RatingView}"
                                           IsPlusOnlyFeature="True"/>
            <core:LiveExplorerTreeViewItem Header="ToggleSwitch"
                                           SampleType="{x:Type samples:ToggleSwitch.Views.ToggleSwitchView}"
                                           IsPlusOnlyFeature="True" />
            <core:LiveExplorerTreeViewItem Header="Enumeration"
                                           SampleType="{x:Type samples:Button.Views.ButtonSpinnerView}" />
         </core:LiveExplorerTreeViewItem>
         <core:LiveExplorerTreeViewItem Header="Buttons"
                                        Style="{StaticResource TreeViewHeaderStyle}"
                                        ItemContainerStyle="{StaticResource TreeViewItemStyle}">
            <core:LiveExplorerTreeViewItem Header="DropDown and Split Buttons"
                                           SampleType="{x:Type samples:Button.Views.DropDownSplitButtonView}" />
         </core:LiveExplorerTreeViewItem>
         <core:LiveExplorerTreeViewItem Header="Charts"
                                        Style="{StaticResource TreeViewHeaderStyle}"
                                        ItemContainerStyle="{StaticResource TreeViewItemStyle}"
                                        IsPlusOnlyFeature="True">
            <core:LiveExplorerTreeViewItem Header="Types"
                                           SampleType="{x:Type samples:Chart.Views.ChartSeriesBasicTypesView}" />
            <core:LiveExplorerTreeViewItem Header="DataPoints Binding"
                                           SampleType="{x:Type samples:Chart.Views.ChartSeriesDataPointsBindingView}" />
            <core:LiveExplorerTreeViewItem Header="Axis"
                                           SampleType="{x:Type samples:Chart.Views.ChartAxisView}" />
            <core:LiveExplorerTreeViewItem Header="Legend"
                                           SampleType="{x:Type samples:Chart.Views.ChartLegendView}" />
            <core:LiveExplorerTreeViewItem Header="Styling"
                                           ItemContainerStyle="{StaticResource TreeViewItemStyle}"
                                           Style="{StaticResource TreeViewSubHeaderStyle}">
               <core:LiveExplorerTreeViewItem Header="Axes Grid"
                                              SampleType="{x:Type samples:Chart.Views.ChartStylingAxesGridView}" />
               <core:LiveExplorerTreeViewItem Header="Line Series"
                                              SampleType="{x:Type samples:Chart.Views.ChartStylingLineSeriesView}" />
               <core:LiveExplorerTreeViewItem Header="Column Series"
                                              SampleType="{x:Type samples:Chart.Views.ChartStylingColumnSeriesView}" />
               <core:LiveExplorerTreeViewItem Header="Pie Series"
                                              SampleType="{x:Type samples:Chart.Views.ChartStylingPieSeriesView}" />
            </core:LiveExplorerTreeViewItem>
         </core:LiveExplorerTreeViewItem>
         <core:LiveExplorerTreeViewItem Header="Windows"
                                        Style="{StaticResource TreeViewHeaderStyle}"
                                        ItemContainerStyle="{StaticResource TreeViewItemStyle}">
            <core:LiveExplorerTreeViewItem Header="StyleableWindows"
                                           SampleType="{x:Type samples:Window.Views.StyleableWindowView}" />
            <core:LiveExplorerTreeViewItem Header="ChildWindow"
                                           SampleType="{x:Type samples:Window.Views.ChildWindowView}" />
            <core:LiveExplorerTreeViewItem Header="WindowContainer"
                                           SampleType="{x:Type samples:Window.Views.WindowContainerView}" />
         </core:LiveExplorerTreeViewItem>
         <core:LiveExplorerTreeViewItem Header="Productivity"
                                        Style="{StaticResource TreeViewHeaderStyle}"
                                        ItemContainerStyle="{StaticResource TreeViewItemStyle}">
            <core:LiveExplorerTreeViewItem Header="BusyIndicator"
                                           ItemContainerStyle="{StaticResource TreeViewItemStyle}"
                                           SampleType="{x:Type samples:BusyIndicator.Views.BusyIndicatorView}">
               <core:LiveExplorerTreeViewItem Header="Custom Content"
                                              SampleType="{x:Type samples:BusyIndicator.Views.BusyIndicatorCustomContentView}" />
               <core:LiveExplorerTreeViewItem Header="Custom Content Template"
                                              SampleType="{x:Type samples:BusyIndicator.Views.BusyIndicatorCustomContentTemplateView}" />
            </core:LiveExplorerTreeViewItem>
            <core:LiveExplorerTreeViewItem Header="Calculator"
                                           SampleType="{x:Type samples:Calculator.Views.CalculatorView}" />
            <core:LiveExplorerTreeViewItem Header="Wizard"
                                           SampleType="{x:Type samples:Wizard.Views.WizardView}" />
             <core:LiveExplorerTreeViewItem Header="Gauge"
                                           ItemContainerStyle="{StaticResource TreeViewItemStyle}"
                                           SampleType="{x:Type samples:Gauge.Views.RadialGaugeView}"
                                           IsPlusOnlyFeature="True" />
            <core:LiveExplorerTreeViewItem Header="MultiCalendar"
                                           IsNewFeature="True"
                                           IsPlusOnlyFeature="True"
                                           SampleType="{x:Type samples:MultiCalendar.Views.MultiCalendarView}" />
            <core:LiveExplorerTreeViewItem Header="Material Controls"
                                           ItemContainerStyle="{StaticResource TreeViewItemStyle}"
                                           IsPlusOnlyFeature="True"
                                           SampleType="{x:Type samples:MaterialControls.Views.MaterialControlsView}"
                                           IsSelected="True">
               <core:LiveExplorerTreeViewItem Header="Button"
                                              SampleType="{x:Type samples:MaterialControls.Views.MaterialButtonView}" />
               <core:LiveExplorerTreeViewItem Header="CheckBox"
                                              SampleType="{x:Type samples:MaterialControls.Views.MaterialCheckBoxView}" />
               <core:LiveExplorerTreeViewItem Header="ComboBox"
                                              SampleType="{x:Type samples:MaterialControls.Views.MaterialComboBoxView}" />
               <core:LiveExplorerTreeViewItem Header="DropDown"
                                              SampleType="{x:Type samples:MaterialControls.Views.MaterialDropDownView}" />
               <core:LiveExplorerTreeViewItem Header="Frame"
                                              SampleType="{x:Type samples:MaterialControls.Views.MaterialFrameView}" />
               <core:LiveExplorerTreeViewItem Header="ListBox"
                                              SampleType="{x:Type samples:MaterialControls.Views.MaterialListBoxView}" />
               <core:LiveExplorerTreeViewItem Header="ProgressBar"
                                              ItemContainerStyle="{StaticResource TreeViewItemStyle}"
                                              SampleType="{x:Type samples:MaterialControls.Views.MaterialProgressBarView}">
                  <core:LiveExplorerTreeViewItem Header="Circular"
                                                 SampleType="{x:Type samples:MaterialControls.Views.MaterialProgressBarCircularView}" />
               </core:LiveExplorerTreeViewItem>
               <core:LiveExplorerTreeViewItem Header="RadioButton"
                                              SampleType="{x:Type samples:MaterialControls.Views.MaterialRadioButtonView}" />
               <core:LiveExplorerTreeViewItem Header="Slider"
                                              SampleType="{x:Type samples:MaterialControls.Views.MaterialSliderView}" />
               <core:LiveExplorerTreeViewItem Header="Switch"
                                              SampleType="{x:Type samples:MaterialControls.Views.MaterialSwitchView}" />
               <core:LiveExplorerTreeViewItem Header="Tabs"
                                              SampleType="{x:Type samples:MaterialControls.Views.MaterialTabsView}" />
               <core:LiveExplorerTreeViewItem Header="TextField"
                                              SampleType="{x:Type samples:MaterialControls.Views.MaterialTextFieldView}" />
               <core:LiveExplorerTreeViewItem Header="Toast"
                                              SampleType="{x:Type samples:MaterialControls.Views.MaterialToastView}" />
               <core:LiveExplorerTreeViewItem Header="ToolTip"
                                              SampleType="{x:Type samples:MaterialControls.Views.MaterialToolTipView}" />
            </core:LiveExplorerTreeViewItem>
         </core:LiveExplorerTreeViewItem>
         <core:LiveExplorerTreeViewItem Header="Other"
                                        Style="{StaticResource TreeViewHeaderStyle}"
                                        ItemContainerStyle="{StaticResource TreeViewItemStyle}">
            <core:LiveExplorerTreeViewItem Header="AvalonDock"
                                           SampleType="{x:Type samples:AvalonDock.Views.AvalonDockView}" />
            <core:LiveExplorerTreeViewItem Header="Magnifier"
                                           SampleType="{x:Type samples:Magnifier.Views.MagnifierView}" />
            <core:LiveExplorerTreeViewItem Header="Pie"
                                           ItemContainerStyle="{StaticResource TreeViewItemStyle}"
                                           SampleType="{x:Type samples:Pie.Views.PieView}">
               <core:LiveExplorerTreeViewItem Header="Chart"
                                              SampleType="{x:Type samples:Pie.Views.PieChartView}" />
               <core:LiveExplorerTreeViewItem Header="Progress"
                                              SampleType="{x:Type samples:Pie.Views.PieProgressView}" />
            </core:LiveExplorerTreeViewItem>
            <core:LiveExplorerTreeViewItem Header="Zoombox"
                                           SampleType="{x:Type samples:Zoombox.Views.ZoomboxView}" />
            <core:LiveExplorerTreeViewItem Header="PileFlowPanel"
                                           SampleType="{x:Type samples:PileFlowPanel.Views.PileFlowPanelView}"
                                           IsPlusOnlyFeature="True" />
            <core:LiveExplorerTreeViewItem Header="SwitchPanel"
                                           SampleType="{x:Type samples:Panels.Views.SwitchPanelView}" />
            <core:LiveExplorerTreeViewItem Header="SlideShow"
                                           SampleType="{x:Type samples:SlideShow.Views.SlideShowView}"
                                           IsPlusOnlyFeature="True"/>
         </core:LiveExplorerTreeViewItem>

         <core:LiveExplorerTreeViewItem Header="Theming"
                                        Style="{StaticResource TreeViewHeaderStyle}"
                                        ItemContainerStyle="{StaticResource TreeViewItemStyle}">
            <core:LiveExplorerTreeViewItem Header="Toolkit for WPF controls"
                                           SampleType="{x:Type samples:Theming.Views.ThemingExtendedToolkitView}"
                                           IsPlusOnlyFeature="True" />
            <core:LiveExplorerTreeViewItem Header="AvalonDock Controls"
                                           SampleType="{x:Type samples:Theming.Views.ThemingAvalonDockView}" />
            <core:LiveExplorerTreeViewItem Header="Core WPF controls"
                                           SampleType="{x:Type samples:Theming.Views.ThemingCoreWPFView}"
                                           IsPlusOnlyFeature="True" />
            <core:LiveExplorerTreeViewItem Header="Datagrid control"
                                           SampleType="{x:Type samples:Theming.Views.ThemingDataGridView}"
                                           IsPlusOnlyFeature="True" />
            <core:LiveExplorerTreeViewItem Header="ListBox control"
                                           SampleType="{x:Type samples:Theming.Views.ThemingListBoxView}"
                                           IsPlusOnlyFeature="True" />
         </core:LiveExplorerTreeViewItem>
      </TreeView>

      <Grid Grid.Column="1"
            Grid.Row="1">
         <!-- TabControl with Sample-XAML-Code TabItems -->
         <TabControl TabStripPlacement="Top"
                     Style="{StaticResource TabControlStyle}">
            <TabItem Header="Sample"
                     Style="{StaticResource TabItemStyle}">

               <Grid>
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="*" />
                     <ColumnDefinition Width="Auto" />
                  </Grid.ColumnDefinitions>

                  <!-- The sample itself -->
                  <ScrollViewer x:Name="_contentScrollViewer"
                                Style="{StaticResource LiveExplorerScrollViewerStyle}"
                                VerticalScrollBarVisibility="{Binding View.VerticalScrollBarVisibility, RelativeSource={RelativeSource AncestorType={x:Type Window}}}"
                                Focusable="False">
                     <ContentPresenter Content="{Binding View, RelativeSource={RelativeSource AncestorType={x:Type Window}}}"
                                       Margin="10,0,10,0"
                                       ScrollViewer.CanContentScroll="True">
                        <ContentPresenter.Resources>
                           <!--
                           Since the LiveExplorerScrollViewerStyle applied on the parent ScrollViewer will override
                           all ScrollBar styles for controls within the ScrollViewer, we must again override the default
                           style for all scrollbars in the ContentPresenter to reapply the default style.
                           -->
                           <Style TargetType="{x:Type ScrollBar}"
                                  BasedOn="{StaticResource ScrollBarBaseStyle}" />
                        </ContentPresenter.Resources>
                     </ContentPresenter>
                  </ScrollViewer>

                  <!-- Right border for sample description -->
                  <Border Grid.Column="1"
                          Width="225"
                          BorderThickness="1"
                          BorderBrush="Gray"
                          Margin="0,0,12,0">
                     <Grid>
                        <Grid.RowDefinitions>
                           <RowDefinition Height="Auto" />
                           <RowDefinition Height="*" />
                           <RowDefinition Height="17" />
                           <RowDefinition Height="20" />
                           <RowDefinition Height="5" />
                        </Grid.RowDefinitions>

                        <!-- Sample title -->
                        <TextBlock TextWrapping="Wrap"
                                   Foreground="#FF606060"
                                   FontSize="16"
                                   FontWeight="Bold"
                                   FontFamily="Segoe UI"
                                   Margin="5,5"
                                   Text="{Binding View.Title, RelativeSource={RelativeSource AncestorType={x:Type Window}}}" />

                        <!-- Description is added in Code-behind to support Paragraphs -->
                        <ScrollViewer Grid.Row="1"
                                      Style="{StaticResource LiveExplorerScrollViewerStyle}"
                                      Margin="5,0"
                                      VerticalScrollBarVisibility="Auto"
                                      HorizontalScrollBarVisibility="Disabled"
                                      BorderBrush="Transparent"
                                      BorderThickness="0"
                                      Focusable="False">
                           <RichTextBox BorderThickness="0"
                                        IsReadOnly="True"
                                        IsHitTestVisible="True"
                                        IsDocumentEnabled="True"
                                        Focusable="False">
                              <FlowDocument x:Name="_flowDocumentDesc" />
                           </RichTextBox>
                        </ScrollViewer>

                        <!-- Bottom Rectangle -->
                        <Rectangle Grid.Row="2"
                                   Grid.RowSpan="3"
                                   Fill="{StaticResource SampleDefaultBrush}" />

                        <!-- Bottom Rectangle text -->
                        <TextBlock Grid.Row="2"
                                   Foreground="White"
                                   FontFamily="Verdana"
                                   FontSize="12"
                                   Margin="5,5,5,0"
                                   Text="Additional Information" />

                        <!-- Bottom Rectangle Hyperlink -->
                        <TextBlock Grid.Row="3"
                                   Margin="20,5,5,0"> 
                           <Hyperlink FontWeight="Black"
                                      Foreground="White"
                                      FontFamily="Verdana"
                                      FontSize="12"
                                      Focusable="False"
                                      RequestNavigate="Hyperlink_RequestNavigate"
                                      NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf/"> 
                              Toolkit Plus 
                           </Hyperlink>
                        </TextBlock>
                     </Grid>
                  </Border>
               </Grid>
            </TabItem>
            <TabItem Header="XAML"
                     Style="{StaticResource TabItemStyle}">
               <xctk:RichTextBox Text="{Binding View.XamlText, RelativeSource={RelativeSource AncestorType={x:Type Window}}}"
                                 TextFormatter="{x:Static core:XamlFormatter.Instance}"
                                 HorizontalAlignment="Stretch"
                                 VerticalAlignment="Stretch"
                                 HorizontalScrollBarVisibility="Auto"
                                 VerticalScrollBarVisibility="Auto"
                                 IsReadOnly="True"
                                 FontFamily="Courier New"
                                 Margin="5,10,5,5" />
            </TabItem>
            <TabItem Header="Code"
                     Style="{StaticResource TabItemStyle}">
               <xctk:RichTextBox Text="{Binding View.CSharpText, RelativeSource={RelativeSource AncestorType={x:Type Window}}}"
                                 TextFormatter="{x:Static core:CSharpFormatter.Instance}"
                                 HorizontalAlignment="Stretch"
                                 VerticalAlignment="Stretch"
                                 HorizontalScrollBarVisibility="Auto"
                                 VerticalScrollBarVisibility="Auto"
                                 IsReadOnly="True"
                                 FontFamily="Courier New"
                                 Margin="5,10,5,5" />
            </TabItem>
         </TabControl>
      </Grid>
   </Grid>
</Window>
